Skip to main content

OpenCLIP Documentation

Build powerful vision-language models with OpenCLIP. Train CLIP models at scale, leverage state-of-the-art pretrained weights, and perform zero-shot image classification and retrieval.

CLIP architecture diagram showing dual encoder structure

Quick start

Get up and running with OpenCLIP in minutes

1

Install OpenCLIP

Install the package using pip:
If you plan to use timm-based image encoders (ConvNeXt, SigLIP, EVA), ensure you have the latest timm installed: pip install -U timm
2

Load a pretrained model

Load a model with pretrained weights and preprocessing transforms:
OpenCLIP provides 80+ pretrained models. List all available models:
3

Encode images and text

Use the model to compute embeddings for zero-shot classification:
4

Train your own model

Train a CLIP model on your own dataset:
OpenCLIP supports distributed training on multiple GPUs and nodes. See the Training guide for details.

Key features

Everything you need to build and deploy vision-language models

State-of-the-art models

Access 80+ pretrained CLIP models achieving up to 85.4% ImageNet zero-shot accuracy

Flexible architectures

Support for ViT, ResNet, ConvNeXt, and custom vision/text encoder combinations

Large-scale training

Battle-tested on up to 1024 GPUs with LAION-2B and DataComp-1B datasets

Zero-shot inference

Classify images without training using natural language descriptions

CoCa support

Generate image captions with contrastive captioner models

HuggingFace integration

Load models from or push to the Hugging Face Hub seamlessly

Resources

Additional resources to help you succeed with OpenCLIP

Research paper

Read the reproducible scaling laws paper for contrastive language-image learning

GitHub repository

View the source code, report issues, and contribute to OpenCLIP

Pretrained model zoo

Browse the complete collection of 80+ pretrained models on Hugging Face Hub

Colab notebooks

Try OpenCLIP in your browser with interactive Jupyter notebooks

Ready to get started?

Start building with OpenCLIP today. Follow our quickstart guide to load your first pretrained model and run zero-shot classification in minutes.

Get Started